from rest_framework.generics import ListAPIView

from django.contrib.auth.models import Permission
from rest_framework.viewsets import ModelViewSet

from meiduo_admin.serializers.permissions import PermissionSerializers
from meiduo_admin.utils.pagination import MeiduoPagination


class PermissionView(ListAPIView):
    queryset = Permission.objects.order_by('content_type_id', 'id')
    serializer_class = PermissionSerializers
    pagination_class = MeiduoPagination

class PermissionSimpleView(ListAPIView):
    queryset = Permission.objects.order_by('content_type_id', 'id')
    serializer_class = PermissionSerializers
